﻿using System;
using System.Data;
using System.Data.Linq;
using System.Data.Linq.Mapping;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Reflection;

namespace PickGold.Data.Linq
{
	public class MappingType : MetaType
	{
		private MetaSource _Source;
		private MappingModel _Model;
		private Type _Entity;

		public MappingType(MetaSource source, MappingModel model, Type entity)
		{
			this._Source = source;
			this._Model = model;
			this._Entity = entity;
		}

		public override ReadOnlyCollection<MetaAssociation> Associations
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		public override bool CanInstantiate
		{
			get { throw new NotImplementedException(); }
		}

		public override MetaDataMember DBGeneratedIdentityMember
		{
			get { throw new NotImplementedException(); }
		}

		public override ReadOnlyCollection<MetaDataMember> DataMembers
		{
			get { throw new NotImplementedException(); }
		}

		public override ReadOnlyCollection<MetaType> DerivedTypes
		{
			get { throw new NotImplementedException(); }
		}

		public override MetaDataMember Discriminator
		{
			get { throw new NotImplementedException(); }
		}

		public override MetaDataMember GetDataMember(MemberInfo member)
		{
			throw new NotImplementedException();
		}

		public override MetaType GetInheritanceType(Type type)
		{
			return new MappingType(this._Source, this._Model, type);
		}

		public override MetaType GetTypeForInheritanceCode(object code)
		{
			throw new NotImplementedException();
		}

		public override bool HasAnyLoadMethod
		{
			get { throw new NotImplementedException(); }
		}

		public override bool HasAnyValidateMethod
		{
			get { throw new NotImplementedException(); }
		}

		public override bool HasInheritance
		{
			get { throw new NotImplementedException(); }
		}

		public override bool HasInheritanceCode
		{
			get { throw new NotImplementedException(); }
		}

		public override bool HasUpdateCheck
		{
			get { throw new NotImplementedException(); }
		}

		public override ReadOnlyCollection<MetaDataMember> IdentityMembers
		{
			get { throw new NotImplementedException(); }
		}

		public override MetaType InheritanceBase
		{
			get { throw new NotImplementedException(); }
		}

		public override object InheritanceCode
		{
			get { throw new NotImplementedException(); }
		}

		public override MetaType InheritanceDefault
		{
			get { throw new NotImplementedException(); }
		}

		public override MetaType InheritanceRoot
		{
			get { throw new NotImplementedException(); }
		}

		public override ReadOnlyCollection<MetaType> InheritanceTypes
		{
			get { throw new NotImplementedException(); }
		}

		public override bool IsEntity
		{
			get { throw new NotImplementedException(); }
		}

		public override bool IsInheritanceDefault
		{
			get { throw new NotImplementedException(); }
		}

		public override MetaModel Model
		{
			get { throw new NotImplementedException(); }
		}

		public override string Name
		{
			get { throw new NotImplementedException(); }
		}

		public override MethodInfo OnLoadedMethod
		{
			get { throw new NotImplementedException(); }
		}

		public override MethodInfo OnValidateMethod
		{
			get { throw new NotImplementedException(); }
		}

		public override ReadOnlyCollection<MetaDataMember> PersistentDataMembers
		{
			get { throw new NotImplementedException(); }
		}

		public override MetaTable Table
		{
			get
			{
				return this._Model.GetTable(this);
			}
		}

		public override Type Type
		{
			get
			{
				return this._Entity;
			}
		}

		public override MetaDataMember VersionMember
		{
			get
			{
				return new MappingMember(this._Source, this._Model, this, null);
			}
		}
	}
}
